#if NEWQ
// Why, oh, why is this format running over the entire waypoint list and
// modifying it? This seems wrong.
-// extern QList<Waypoint*> waypt_list;
-// foreach(Waypoint* waypointp, waypt_list) {
-// bh->wpt = waypointp;
- if (false) {
+ extern QList<Waypoint*> waypt_list;
+ foreach(Waypoint* waypointp, waypt_list) {
+ bh->wpt = waypointp;
#else
queue* elem, *tmp;
extern queue waypt_head;
comp = (Waypoint**) xcalloc(nelems, sizeof(*comp));
qlist = (int*) xcalloc(nelems, sizeof(*qlist));
+#if NEWQ
+ foreach(Waypoint* waypointp, waypt_list) {
+ comp[i] = waypointp;
+#else
QUEUE_FOR_EACH(q, elem, tmp) {
comp[i] = (Waypoint*)elem;
+#endif
qlist[i] = 0;
i++;
}